function changelocation(adirect){
    window.location.href = adirect;
}
$(function () {
    $("#joinClick").click(function(e){
        var serializeArray = $("#join_form").serializeArray();
        var activityId = $("#activityId").val();
        $.post("/home/api/activityJoin", serializeArray, function (result) {
            if(result.code !== 200){
                alert(result.msg);
            }else{
                $.dialog({
                    width: 200,
                    height: 50,
                    cache : true,
                    radius : false,
                    animated : false,
                    content : "报名成功,正在跳转中......",
                    padding: 10,
                });
                var auUrl = "/home/active/item/"+activityId;
                setTimeout("changelocation('"+auUrl+"')",1500 );
            }
        });
    });
});